home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gs24src.zip / TURBOC.MAK < prev    next >
Text File  |  1992-03-20  |  7KB  |  206 lines

  1. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  2. #    Distributed by Free Software Foundation, Inc.
  3. #
  4. # This file is part of Ghostscript.
  5. #
  6. # Ghostscript is distributed in the hope that it will be useful, but
  7. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. # to anyone for the consequences of using it or for whether it serves any
  9. # particular purpose or works at all, unless he says so in writing.  Refer
  10. # to the Ghostscript General Public License for full details.
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute
  13. # Ghostscript, but only under the conditions described in the Ghostscript
  14. # General Public License.  A copy of this license is supposed to have been
  15. # given to you along with Ghostscript so you can know your rights and
  16. # responsibilities.  It should be in a file named COPYING.  Among other
  17. # things, the copyright notice and this notice must be preserved on all
  18. # copies.
  19.  
  20. # makefile for Ghostscript, MS-DOS/Turbo C platform.
  21.  
  22. # ------------------------------- Options ------------------------------- #
  23.  
  24. ###### This section is the only part of the file you should need to edit.
  25.  
  26. # ------ Generic options ------ #
  27.  
  28. # Define the default directory/ies for the runtime
  29. # initialization and font files.  Separate multiple directories with \;.
  30. # Use \\ or / to indicate directories, not a single \.
  31.  
  32. GS_LIB_DEFAULT=c:/gs\;c:/gs/fonts
  33.  
  34. # Define the name of the Ghostscript initialization file.
  35. # (There is no reason to change this.)
  36.  
  37. GS_INIT=gs_init.ps
  38.  
  39. # Choose generic configuration options.
  40.  
  41. # Setting DEBUG=1 includes debugging features (-Z switch) in the code.
  42. # Code runs substantially slower even if no debugging switches are set,
  43. # and also takes about another 25K of memory.
  44.  
  45. DEBUG=0
  46.  
  47. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  48. # so they are visible to the debugger and profiler.
  49. # No execution time or space penalty, just larger .OBJ and .EXE files.
  50.  
  51. NOPRIVATE=0
  52.  
  53. # ------ Platform-specific options ------ #
  54.  
  55. # If you don't have an assembler, set USE_ASM=0.  Otherwise, set USE_ASM=1,
  56. # and set ASM to the name of the assembler you are using.  This can be
  57. # a full path name if you want.  Normally it will be masm or tasm.
  58.  
  59. USE_ASM=1
  60. ASM=masm
  61.  
  62. # Define the drive and directory for the Turbo C files.
  63. # COMPDIR contains the compiler and linker (normally \tc).
  64. # BGIDIR contains the BGI files (normally /tc).  Note that BGIDIR,
  65. #   unlike all the others, must use / rather than \.
  66. # INCDIR contains the include files (normally \tc\include).
  67. # LIBDIR contains the library files (normally \tc\lib).
  68. # Note that these prefixes are always followed by a \,
  69. #   so if you want to use the current directory, use an explicit '.'.
  70.  
  71. COMPDIR=c:\tc
  72. BGIDIR=c:/tc
  73. INCDIR=c:\tc\include
  74. LIBDIR=c:\tc\lib
  75.  
  76. # Choose platform-specific options.
  77.  
  78. # Define the processor (CPU) type.  Options are 86, 186, 286, 386, or 486.
  79. # (The 8086 and 8088 both correspond to processor type 86.)
  80. # 286 and up do not use protected mode.  Higher numbers produce
  81. # code that may be significantly smaller and faster, but the executable
  82. # will bail out with an error message on lower-numbered processor types.
  83.  
  84. CPU_TYPE=86
  85.  
  86. # Define the math coprocessor (FPU) type.  Options are 0, 87, 287, or 387.
  87. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  88. # CPU includes the equivalent of an 80387 on-chip.
  89. # A non-zero option means that the executable will only run if a FPU
  90. # of that type (or higher) is available: this is NOT currently checked
  91. # at runtime.
  92. #   Code is significantly faster.
  93.  
  94. FPU_TYPE=0
  95.  
  96. # ---------------------------- End of options ---------------------------- #
  97.  
  98. # Define the name of the makefile -- used in dependencies.
  99.  
  100. MAKEFILE=turboc.mak
  101.  
  102. # Define the ANSI-to-K&R dependency.  (Turbo C accepts ANSI syntax.)
  103.  
  104. AK=
  105.  
  106. # Define the compilation flags for an 80286.
  107.  
  108. F286=-1
  109.  
  110. !include "tccommon.mak"
  111.  
  112. # Define the compilation flags.
  113.  
  114. !if $(NOPRIVATE)
  115. CP=-DNOPRIVATE
  116. !else
  117. CP=
  118. !endif
  119.  
  120. !if $(DEBUG)
  121. CD=-DDEBUG
  122. !else
  123. CD=
  124. !endif
  125.  
  126. GENOPT=$(CP) $(CD)
  127.  
  128. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS) -m$(MM)
  129. CC=$(COMPDIR)\tcc -d -r -y -G -N -I$(INCDIR)
  130. CCC=$(CC) -a $(CCFLAGS) -O -c
  131. CC0=$(COMPDIR)\tcc -m$(MM) -I$(INCDIR) -c
  132. CCINT=$(CC) -a $(CCFLAGS) -c
  133.  
  134. .c.obj:
  135.     $(CCC) $<
  136.  
  137. .c.i:
  138.     $(COMPDIR)\cpp -I$(INCDIR) -a $(CCFLAGS) -P- $<
  139.  
  140. # ------ Devices and features ------ #
  141.  
  142. # Choose the language feature(s) to include.  See gs.mak for details.
  143. # Note that because Turbo C doesn't use overlays,
  144. # we don't include any optional features.
  145.  
  146. FEATURE_DEVS=
  147.  
  148. # Choose the device(s) to include.  See devs.mak for details.
  149. # Note that because Turbo C doesn't use overlays,
  150. # we only include a limited set of device drivers.
  151.  
  152. DEVICE_DEVS=vga.dev ega.dev epson.dev bj10e.dev deskjet.dev djet500.dev laserjet.dev ljet2p.dev ljet3.dev
  153. !include "gs.mak"
  154. !include "devs.mak"
  155.  
  156. # -------------------------------- Library -------------------------------- #
  157.  
  158. # We have to compile gp_itbc without -1, because it includes a run-time
  159. # check to make sure we are running on the right kind of processor.
  160. gp_itbc.$(OBJ): gp_itbc.c $(string__h) $(gx_h) $(gp_h) $(MAKEFILE) makefile
  161.     $(CC) -a -m$(MM) $(GENOPT) -DCPU_TYPE=$(CPU_TYPE) -c gp_itbc.c
  162.  
  163. gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h)
  164.  
  165. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  166.  
  167. # ----------------------------- Main program ------------------------------ #
  168.  
  169. iutilasm.$(OBJ): iutilasm.asm
  170.  
  171. # A rule to do a quick and dirty compilation attempt when first installing
  172. # Ghostscript.  Many of the compilations will fail: follow this with 'make'.
  173.  
  174. begin:
  175.     erase arch.h
  176.     erase genarch.exe
  177.     make arch.h
  178.     - $(CCC) *.c
  179.     erase gp_*.obj
  180.     erase gdevepsn.obj
  181.  
  182. # Get around the fact that the DOS shell has a rather small limit on
  183. # the length of a command line.  (sigh)
  184.  
  185. LIBCTR=libc$(MM).tr
  186.  
  187. $(LIBCTR): $(MAKEFILE) makefile
  188.     gsecho $(LIBCTR) $(LIBDIR)\$(FPLIB)+
  189.     gsecho -a $(LIBCTR) $(LIBDIR)\math$(MM) $(LIBDIR)\c$(MM)
  190.  
  191. # Tracing package
  192.  
  193. # trace.c must be compiled without the -a switch!
  194. trace.obj: trace.c
  195.     $(CC) $(CCFLAGS) -O -c trace.c
  196.  
  197. LIBDOS=$(LIB) obj.tr
  198.  
  199. # Interpreter main program
  200.  
  201. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) trace.$(OBJ)\
  202.   $(LIBDOS) $(LIBCTR) obj.tr lib.tr
  203.  
  204. gs.exe: $(GS_ALL)
  205.     tlink /m /l $(LIBDIR)\c0$(MM) @obj.tr $(INTASM) @gs.tr ,gs,gs,@lib.tr @$(LIBCTR)
  206.